package e.odbo.data.model.smaple;

import e.odbo.data.generator.Generator;
import e.odbo.data.model.Column;
import e.odbo.data.model.ColumnType;
import e.odbo.data.model.I_ColumnGather;

public class TimeLogAble implements I_ColumnGather {
    public final static int TABLE_FLAG_TIMELOG=PK.TABLE_FLAG_PK<<1;

    public final static TimeLogAble Instance=new TimeLogAble();

    public final static String CURDATE="CURDATE";

    public final static String LASTMODIFIED="LASTMODIFIED";

    @Override
    public Column[] getColumns() {
        return new Column[]{Column.c(CURDATE, ColumnType.TIMESTAMP.defaultGenerator(Generator.NOW)).NotNull(),
                            Column.c(LASTMODIFIED,ColumnType.TIMESTAMP)};
    }

    @Override
    public int addTableFlags() {
        return TABLE_FLAG_TIMELOG;
    }

}
